from fastapi import FastAPI
from core import *

app = FastAPI()


@app.get("/rhyme/with_tone/{word}")
def with_tone(word: str):
    return find_rhyme_with_tone(word).collect()


@app.get("/rhyme/without_tone/{word}")
def without_tone(word: str):
    return find_rhyme_without_tone(word).collect()


@app.get("/rhyme/similar_with_tone/{word}")
def similar_with_tone(word: str):
    return find_rhyme_with_tone_similar(word)


@app.get("/rhyme/similar_without_tone/{word}")
def similar_without_tone(word: str):
    return find_rhyme_without_tone_similar(word)
